# s = ["1", "22", "333"]

str = input()
s = str.split(",")
length = len(s)
num = []
for i in s:
    num.append(len(i))
max1 = max(num)
for i in num:
    if max1 == i:
        print(num.index(i))
